package br.com.managerprojectplugin.view;

import java.util.ArrayList;

import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;

import br.com.managerprojectplugin.model.Stakeholder;

public class StakeHoldersContentProvider implements IStructuredContentProvider {
	

	@Override
	public void dispose() {

	}

	@Override
	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {

	}

	@Override
	public Object[] getElements(Object inputElement) {
		if(inputElement instanceof ArrayList<?>){
		@SuppressWarnings("unchecked")
		ArrayList<Stakeholder> sk = (ArrayList<Stakeholder>) inputElement;
		return (Object[]) sk.toArray();
		}
		return null;
	}

}
